package week3;
	

public class LightSwitch {
	private boolean switchState;
	private LightBulb bulb;
	
	
	
	public LightSwitch(boolean switchState, LightBulb bulb){
		this.switchState = switchState;
		this.bulb = bulb;
		if (switchState==true){
		bulb.changeState();
		}
	}
	
	public boolean isState(){
		return switchState;
	}
	
	public void useSwitch(){
		switchState = !switchState;
		bulb.changeState();
		
	}
	

}
